﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BlueLotus7.Web
{



    /// <summary>
    /// Class for GridColumn
    /// </summary>
    public class GridColumn
    {
        /// <summary>
        /// Gets or sets a value of title, which is used to be text for header.
        /// </summary>
        public string Title
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of name, which is used to be mapping identity.
        /// </summary>
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether the column is visible.
        /// </summary>
        public bool Visible
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of event, which is the JavaScript function fired when value changed.
        /// </summary>
        public string Event
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of type.
        /// </summary>
        public string Type
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of source. 
        /// This property is used only when Type is Radio/Combo
        /// </summary>
        public string Source
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of source text mapping. 
        /// This property is used only when Type is Radio/Combo
        /// </summary>
        public string SourceTextMapping
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of source value mapping. 
        /// This property is used only when Type is Radio/Combo
        /// </summary>
        public string SourceValueMapping
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of defaut value.
        /// </summary>
        public string DefaultValue
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether this field will be provented from edit mode.
        /// </summary>
        public bool Readonly
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value of CSS
        /// </summary>
        public string CSS
        {
            get;
            set;
        }

        /// <summary>
        /// Constructure
        /// </summary>
        public GridColumn()
        {
            this.Visible = true;
            this.Type = DataType.Text;
        }
    }
}